package com.licode.codekit.db;

import org.apache.commons.lang3.StringUtils;

public class Index {
    String tableName;
    String indexName;
    boolean unique;
    String params;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getIndexName() {
        return indexName;
    }

    public void setIndexName(String indexName) {
        this.indexName = indexName;
    }

    public boolean isUnique() {
        return unique;
    }

    public void setUnique(boolean unique) {
        this.unique = unique;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public void addParams(String param) {
        if (StringUtils.isBlank(params)) {
            params = param;
        } else {
            params = params + "," + param;
        }
    }
}
